import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { TiktokOrderQuery, TiktokOrderVO, TiktokOrderStatistics } from '@/api/operates/tiktokOrder/types';

/**
 * 抖音订单列表
 * @param query 
 * @returns 
 */
export const listTiktokOrder = (query: TiktokOrderQuery): AxiosPromise<TableInfoVO<TiktokOrderVO>> => {
  return request({
    url: '/tiktok/order/list',
    method: 'get',
    params: query
  });
};

/**
 * 抖音订单统计
 * @param query 
 * @returns 
 */
export const statisticsTiktokOrder = (query: TiktokOrderQuery): AxiosPromise<TiktokOrderStatistics> => {
  return request({
    url: '/tiktok/order/statistics',
    method: 'get',
    params: query
  });
};